package com.emm.yixun.website.task.utils;

import java.util.ArrayList;
import java.util.List;

public class ArrayAssembly {
	
	public static final String AJCouple = "peContactAddress,rqTheirMotives,rqDemandArea,rqServicesId,rqLifeSupport,rqPaymentMethod,peResidenceProvinceId,peResidenceCityId,peResidenceAreaId,rqFocusId"+
	                ",peDocumentType,peDocumentNumber,peBirth,peDomicilePlace,peWorkaroundProvinceId,peWorkaroundCityId,peWorkaroundAreaId,richangxinxi,peHobbyId,peActivityType";
	
	public static final String ACouple = "rqTheirMotives,rqDemandArea,rqServicesId,rqLifeSupport,rqPaymentMethod,peResidenceProvinceId,peResidenceCityId,peResidenceAreaId,rqFocusId"+
            ",peWorkaroundProvinceId,peWorkaroundCityId,peWorkaroundAreaId";
	
	public static final String BCouple = "";
	public static final String CCouple = "";
	public static final String DCouple = "";
	
	public static List<String> convestArrayList(String type){
		//A+ = 1  A =2  B=3 C=4 D=5
		if(type.equals("1")){
			return convest(AJCouple);
		}else if(type.equals("2")){
			return  convest(ACouple);
		}else if(type.equals("3")){
			return convest(BCouple);
		}else if(type.equals("4")){
			return  convest(CCouple);
		}else if(type.equals("5")){
			return convest(DCouple);
		}
		return null;
	}
	
	public static List<String> convest(String param){
		List<String> list = new ArrayList<String>();
		String[] str = param.split(",");
		if(null!=str && str.length>0){
			for (int i = 0; i < str.length; i++) {
				list.add(str[i]);
			}
		}
		
		return list;
	}
}
